#include "stdio.h"
#include "stdlib.h"
#include "math.h"
#include "treeStructure.h"
#include "treeBuild.h"
#include "treeTravers.h" 

// main
extern int addNum;
extern int removeNum;
int main( int argc, char **argv ) {

	Node *head;

  // make the head node
  	head = makeNode( 0.0,0.0, 0 );

  // make a tree
  	int level;
  	scanf("%d",&level);
  	growTree(head,level);
  	Adapt(head);
  	printf("add = %d remove = %d\n",addNum,removeNum);
  	writeTree(head);
	destoryTree(head);
	printf("Finished!\n");

  // print the tree for Gnuplot
  	return 0;
}
